import { BeaconBasePannel } from "../BeaconBasePannel";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { ObjCreate } from "../../../common/ObjCreate";
import { LoaderHelp } from "../../../../../common/display/LoaderHelp";
import { GlobalClass } from "../../../../../../com/mui/core/GlobalClass";
//class DomWarBeaOtherPartBase
    
    export  class DomWarBeaOtherPartBase extends BeaconBasePannel
    {
        constructor(arg1: string="", arg2: Boolean=true, arg3: string="", arg4: number=590, arg5: number=480)
        {
            super(arg1, arg2, arg3, arg4, arg5);
            return;
        }

        protected /* override */ configUI(): void
        {
            if (this._samebg) 
            {
                if (_bgName == "") 
                {
                    _bgName = ImagesConst.WindowCenterB;
                }
                this._bgImage = ObjCreate.createBg(0, 0, this._bgW, this._bgH, this, _bgName);
                this._partBgImg = ObjCreate.createBg(15, 40, 180, 295, this);
                this._titleTxtImg1 = new Object /* flash.display.Bitmap */();
                this._titleTxtImg1.x = 61;
                this._titleTxtImg1.y = 7;
                this._titleTxtImg2 = new Object /* flash.display.Bitmap */();
                this._titleTxtImg2.x = 61;
                this._titleTxtImg2.y = 365;
                addChild(this._titleTxtImg1);
                addChild(this._titleTxtImg2);
            }
            if (_imageResName != "") 
            {
                LoaderHelp.addResCallBack(_imageResName, this.onImageLoaded);
            }
            return;
        }

        protected /* override */ onImageLoaded(): void
        {
            if (this._samebg) 
            {
                this._titleBg1 = this.getBlueGlowBg(0, 2);
                this._titleBg2 = this.getBlueGlowBg(0, 360);
                this._titleTxtImg1.bitmapData = GlobalClass.getBitmapData(ImagesConst.DWBTxtImage_ServerInfo);
            }
            return;
        }

        protected getBlueGlowBg(arg1: number, arg2: number): Object /* flash.display.Bitmap */
        {
            var loc1=new Object /* flash.display.Bitmap */();
            loc1.bitmapData = GlobalClass.getBitmapData(ImagesConst.DWBBlueGlowBg);
            loc1.x = arg1;
            loc1.y = arg2;
            this.addChild(loc1);
            return loc1;
        }

        protected /* var */_titleBg1: Object /* flash.display.Bitmap */;

        protected /* var */_titleBg2: Object /* flash.display.Bitmap */;

        protected /* var */_titleTxtImg1: Object /* flash.display.Bitmap */;

        protected /* var */_titleTxtImg2: Object /* flash.display.Bitmap */;

        protected /* var */_partBgImg: Object /* flash.display.Bitmap */;
    }
